import request from '@/utils/request'

// 查询缺陷列表
export function listFlaw(query) {
  return request({
    url: '/project/flaw/list',
    method: 'get',
    params: query
  })
}

// 查询缺陷详细
export function getFlaw(flawId) {
  return request({
    url: '/project/flaw/' + flawId,
    method: 'get'
  })
}

// 新增缺陷
export function addFlaw(data) {
  return request({
    url: '/project/flaw',
    method: 'post',
    data: data
  })
}

// 修改缺陷
export function updateFlaw(data) {
  return request({
    url: '/project/flaw',
    method: 'put',
    data: data
  })
}

// 删除缺陷
export function delFlaw(flawId) {
  return request({
    url: '/project/flaw/' + flawId,
    method: 'delete'
  })
}
